\(\int \frac {\sin (a+b \log (c x^n))}{x} \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 19 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos \left (a+b \log \left (c x^n\right )\right )}{b n} \]

[Out]

-cos(a+b*ln(c*x^n))/b/n

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2718} \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos \left (a+b \log \left (c x^n\right )\right )}{b n} \]

[In]

Int[Sin[a + b*Log[c*x^n]]/x,x]

[Out]

-(Cos[a + b*Log[c*x^n]]/(b*n))

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \sin (a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n} \\ & = -\frac {\cos \left (a+b \log \left (c x^n\right )\right )}{b n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 38, normalized size of antiderivative = 2.00 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos (a) \cos \left (b \log \left (c x^n\right )\right )}{b n}+\frac {\sin (a) \sin \left (b \log \left (c x^n\right )\right )}{b n} \]

[In]

Integrate[Sin[a + b*Log[c*x^n]]/x,x]

[Out]

-((Cos[a]*Cos[b*Log[c*x^n]])/(b*n)) + (Sin[a]*Sin[b*Log[c*x^n]])/(b*n)

Maple [A] (verified)

Time = 0.34 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05

method result size
derivativedivides \(-\frac {\cos \left (a +b \ln \left (c \,x^{n}\right )\right )}{b n}\) \(20\)
default \(-\frac {\cos \left (a +b \ln \left (c \,x^{n}\right )\right )}{b n}\) \(20\)
parallelrisch \(\frac {-\cos \left (a +2 b \ln \left (\sqrt {c \,x^{n}}\right )\right )-1}{b n}\) \(26\)

[In]

int(sin(a+b*ln(c*x^n))/x,x,method=_RETURNVERBOSE)

[Out]

-cos(a+b*ln(c*x^n))/b/n

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{b n} \]

[In]

integrate(sin(a+b*log(c*x^n))/x,x, algorithm="fricas")

[Out]

-cos(b*n*log(x) + b*log(c) + a)/(b*n)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (15) = 30\).

Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.89 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \sin {\left (a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\left (x \right )} \sin {\left (a + b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\- \frac {\cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b n} & \text {otherwise} \end {cases} \]

[In]

integrate(sin(a+b*ln(c*x**n))/x,x)

[Out]

Piecewise((log(x)*sin(a), Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*sin(a + b*log(c)), Eq(n, 0)), (-cos(a + b
*log(c*x**n))/(b*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos \left (b \log \left (c x^{n}\right ) + a\right )}{b n} \]

[In]

integrate(sin(a+b*log(c*x^n))/x,x, algorithm="maxima")

[Out]

-cos(b*log(c*x^n) + a)/(b*n)

Giac [F]

\[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\int { \frac {\sin \left (b \log \left (c x^{n}\right ) + a\right )}{x} \,d x } \]

[In]

integrate(sin(a+b*log(c*x^n))/x,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)/x, x)

Mupad [B] (verification not implemented)

Time = 26.82 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {\sin \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\cos \left (a+b\,\ln \left (c\,x^n\right )\right )}{b\,n} \]

[In]

int(sin(a + b*log(c*x^n))/x,x)

[Out]

-cos(a + b*log(c*x^n))/(b*n)